@layout("/common/_container.html"){
<!--startprint1-->
<style>
    .print_box{background: white;padding: 0 20px;}
    .divFlex{display: flex;line-height: 35px;border-top: 2px solid black;border-bottom: 2px solid black;}
    .divFlex1{display: flex;line-height: 35px;border-bottom: 1px solid black;margin-top:10px;}
    .divFlex>span,.divFlex1>span,.divFoot>span{flex: 1;text-indent: 5px;}
    .ulDetail>li{line-height: 35px;margin-top: 10px;display: flex}
    .ulDetail>li>div{text-indent: 5px;}
    .ulDetail>li>div:first-of-type{flex: 1}
    .ulDetail>li>div:last-of-type{flex: 6}
    .divFoot{line-height: 35px;border-top: 1px solid black;border-bottom: 1px solid black;}
    .divFoot>span:first-of-type{display: inline-block;width: 65%}
    .divFoot>span:last-of-type{display: inline-block;width: 30%}
    .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
</style>
<div style="display: none"></div>
<div id="div_print" class="print_box">
    <div style="color: black;">
        <div style="text-align: center;padding: 20px;"><h1 style="margin: 0;">咿呀口腔${deptInfo.simplename}就诊病历</h1></div>
        <div class="divFlex"><span>姓名：${customerInfo.customerName}</span><span>性别：${customerInfo.sex}</span><span>年龄：${customerInfo.customerAge}</span></div>
        <div class="divFlex1"><span>病历号：${customerInfo.medicalRecordNumber}</span><span>就诊时间：${caseInfo.finnallyTime}</span><span>医生：${caseInfo.doctorId}</span></div>
        <div>
            <ul class="ulDetail" style="padding: 0;">
                    <li class="clearfix">
                        <div>复诊：</div>
                        <div>${caseInfo.zhushu}</div>
                    </li>
                <li class="clearfix">
                    <div>口腔检查：</div>
                    <div>
                        @for(item in caseInfo.toothSite1List){
                        @if(item.remarks != ""){
                        <div style="position: relative">
                            <div style="display: inline-block;line-height: 20px;">
                                <div style="border-bottom: 1px solid;">
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="leftUp1" id="yw_left_top1">${item.leftUp}</div>
                                    <div style="display: inline-block;width:55px;" class="leftDown1" id="yw_left_bottom1">${item.leftDown}</div>
                                </div>
                                <div>
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="rightUp1" id="yw_right_top1">${item.rightUp}</div>
                                    <div style="display: inline-block;width:55px;" class="rightDown1" id="yw_right_bottom1">${item.rightDown}</div>
                                </div>
                            </div>
                            <span style="margin-left: 20px;position: absolute;top: 50%;transform: translateY(-50%);">${item.remarks}</span>
                        </div>
                        @}
                        @}
                    </div>
                </li>
                <li class="clearfix">
                    <div>辅助检查：</div>
                    <div>
                        @for(item in caseInfo.toothSite2List){
                        @if(item.remarks != ""){
                        <div style="position: relative">
                            <div style="display: inline-block;line-height: 20px;">
                                <div style="border-bottom: 1px solid;">
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="leftUp2" id="yw_left_top2">${item.leftUp}</div>
                                    <div style="display: inline-block;width:55px;" style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;" class="leftDown2" id="yw_left_bottom2">${item.leftDown}</div>
                                </div>
                                <div>
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="rightUp2" id="yw_right_top2">${item.rightUp}</div>
                                    <div style="display: inline-block;width:55px;" class="rightDown2" id="yw_right_bottom2">${item.rightDown}</div>
                                </div>
                            </div>
                            <span style="margin-left: 20px;position: absolute;top: 50%;transform: translateY(-50%);">${item.remarks}</span>
                        </div>
                        @}
                        @}
                    </div>
                </li>
                <li class="clearfix">
                    <div>诊断：</div>
                    <div>
                        @for(item in caseInfo.toothSite3List){
                        @if(item.remarks != ""){
                        <div style="position: relative">
                            <div style="display: inline-block;line-height: 20px;">
                                <div style="border-bottom: 1px solid;">
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="leftUp3" id="yw_left_top3">${item.leftUp}</div>
                                    <div style="display: inline-block;width:55px;" style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;" class="leftDown3" id="yw_left_bottom3">${item.leftDown}</div>
                                </div>
                                <div>
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="rightUp3" id="yw_right_top3">${item.rightUp}</div>
                                    <div style="display: inline-block;width:55px;" class="rightDown3" id="yw_right_bottom3">${item.rightDown}</div>
                                </div>
                            </div>
                            <span style="margin-left: 20px;position: absolute;top: 50%;transform: translateY(-50%);">${item.remarks}</span>
                        </div>
                        @}
                        @}
                    </div>
                </li>
                <li class="clearfix">
                    <div>治疗方案：</div>
                    <div>
                        @for(item in caseInfo.toothSite4List){
                        @if(item.remarks != ""){
                        <div style="position: relative">
                            <div style="display: inline-block;line-height: 20px;">
                                <div style="border-bottom: 1px solid;">
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="leftUp4" id="yw_left_top4">${item.leftUp}</div>
                                    <div style="display: inline-block;width:55px;"class="leftDown4">${item.leftDown}</div>
                                </div>
                                <div>
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="rightUp4" id="yw_left_bottom4" id="yw_right_top4">${item.rightUp}</div>
                                    <div style="display: inline-block;width:55px;" class="rightDown4" id="yw_right_bottom4">${item.rightDown}</div>
                                </div>
                            </div>
                            <span style="margin-left: 20px;position: absolute;top: 50%;transform: translateY(-50%);">${item.remarks}</span>
                        </div>
                        @}
                        @}
                    </div>
                </li>
                <li class="clearfix">
                    <div>处置：</div>
                    <div>
                        @for(item in caseInfo.toothSite5List){
                        @if(item.remarks != ""){
                        <div style="position: relative">
                            <div style="display: inline-block;line-height: 20px;">
                                <div style="border-bottom: 1px solid;">
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="leftUp5" id="yw_left_top5">${item.leftUp}</div>
                                    <div style="display: inline-block;width:55px;" class="leftDown5" id="yw_left_bottom5">${item.leftDown}</div>
                                </div>
                                <div>
                                    <div style="display: inline-block;width:55px;border-right: 1px solid black;text-align: right;padding-right: 10px;height: 22px;margin-bottom: -5px;" class="rightUp5" id="yw_right_top5">${item.rightUp}</div>
                                    <div style="display: inline-block;width:55px;" class="rightDown5" id="yw_right_bottom5">${item.rightDown}</div>
                                </div>
                            </div>
                            <span style="margin-left: 20px;position: absolute;top: 50%;transform: translateY(-50%);">${item.remarks}</span>
                        </div>
                        @}
                        @}
                    </div>
                </li>
                <li class="clearfix">
                    <div>医嘱：</div>
                    <div>${caseInfo.doctorAdvice}</div>
                </li>
                <li class="clearfix">
                    <div>备注：</div>
                    <div>${caseInfo.remarkss}</div>
                </li>
            </ul>
        </div>
        <div class="divFoot">
            <span>地址:${deptInfo.address}</span>
            <span>电话:${deptInfo.phone}</span>
        </div>
    </div>
    <!--endprint1-->
</div>
<div style="background: white;padding: 20px;" class="col-sm-12 clearfix">
    <div style="float: right;">
        <input type="button" style="color: white;background:#30add1;" class="btn" name='button_export' title='打印1' onclick="preview(1)" value="点击打印">
    </div>
</div>

<script language="javascript">
    function preview(oper) {
        if (oper < 10){
            bdhtml=window.document.body.innerHTML;//获取当前页的html代码
            sprnstr="<!--startprint"+oper+"-->";//设置打印开始区域
            eprnstr="<!--endprint"+oper+"-->";//设置打印结束区域
            prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html
            prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html
            window.document.body.innerHTML=prnhtml;
            window.print();
            window.document.body.innerHTML=bdhtml;
        } else {
            window.print();
        }
    }
</script>
@}
